<#setting number_format = "#"/>
<#import "../macros/presentation.ftl" as presentation/>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Expires" content="-1" />
		<title>${I18n.getMessage("forumIndex.defaultTitle")}</title>
		<style type="text/css">
@import
	url( ${contextPath}/templates/${templateName}/styles/style.css?${startupTime} )
	;
</style>
		<style type="text/css">
@import
	url( ${contextPath}/templates/${templateName}/styles/${language}.css?${startupTime} )
	;
</style>
<style type="text/css">
	.userOnlineInfo div{font-size: 12px; text-align: right;}
	.forumline2 { border: #c589b4 1px solid; width: 100%;margin:0px;}
	.title_index_list{border: #c589b4 1px solid; border-bottom:0px solid;}
	.title_index_list td{padding: 1 1 1 1; font-size: 14px;}
	tr.title_bg2{background:url(${contextPath}/templates/${templateName}/images/title_3bg.jpg) repeat-x 0px 0px; width:100%; height: 24px; font-size:14px;}
	.topictitle2 a{font-size: 14px;}
	/**
	td.logoSpan{background:url(${contextPath}/templates/${templateName}/images/cfnav_bg.gif) repeat-x 0px 1px; width:100%; height: 102px;}
	**/
	td.logoSpan span.s1{background:url(${contextPath}/templates/${templateName}/images/cfnav_logo.gif) no-repeat 0px 0px; width:970px; height: 102px;}
	td.logoSpan span.s2{width: 320px;height: 102px;}
</style>
	</head>
	<body bgcolor="#FFFFF">
		<!-- MAIN TABLE -->
		<table width="98%" height="100%" align="center" valign="top">
			 <tr>
					<td align="left" valign="middle" colspan="2" class="logoSpan">
						 <span class="s1"></span>
						 <span class="s2">
						     <iframe src="${contextPath}/user/login_index.page" height="102px" width="100%" frameborder="0" scrolling="no"></iframe>
						 </span>
					</td>
				</tr>
			<tr>
				<td valign="top" height="100%">
					<table cellspacing="0" cellpadding="0" width="100%" border="0"
						class="title_index_list">
						<tr>
							<td>
								<table class="forumline2 title_bg2" cellspacing="0"
									cellpadding="0" border="0">
									<tr class="gensmall title_bg2">
										<td colspan="4">
											${I18n.getMessage("ForumListing.recommandTopic")}
										</td>
									</tr>
									<#list RecommandTopics as topic> <#if topic_index <
									index_topics>
									<tr class="gensmall">
										<td>
											${topic_index+1}
										</td>
										<td>
											<span class="topictitle2"> 
											<@presentation.folderImage topic/>
											<a
												href="${JForumContext.encodeURL("/posts/list/${topic.id}")}">
													<#if (topic.title?length == 0)> No Subject <#else>
													${topic.title?html} </#if> </a> </span>
										</td>
										<td>
											${topic.lastPostBy.username}
										</td>
										<td>
											${topic.lastPostTime}
										</td>
									</tr>
									</#if> </#list> <#if (index_topics?number -
									AnnounceTopics.size() > 0 )> <#list 1.. index_topics -
									RecommandTopics.size() as n>
									<tr class="gensmall ">
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
									</tr>
									</#list> </#if>
								</table>
							</td>
							<td>
								<table class="forumline2 title_bg2" cellspacing="0"
									cellpadding="0" border="0">
									<tr class="gensmall title_bg2">
										<td colspan="4">
											${I18n.getMessage("ForumListing.annonceTopic")}
										</td>
									</tr>
									<#list AnnounceTopics as topic> <#if topic_index <
									index_topics>
									<tr class="gensmall">
										<td>
											${topic_index+1}
										</td>
										<td>
											<span class="topictitle2"> 
											<@presentation.folderImage topic/>
										     <a
												href="${JForumContext.encodeURL("/posts/list/${topic.id}")}">
													<#if (topic.title?length == 0)> No Subject <#else>
													${topic.title?html} </#if> </a> </span>
										</td>
										<td>
											${topic.lastPostBy.username}
										</td>
										<td>
											${topic.lastPostTime}
										</td>
									</tr>
									</#if> </#list> <#if (index_topics?number -
									AnnounceTopics.size() > 0 )> <#list 1.. index_topics -
									AnnounceTopics.size() as n>
									<tr class="gensmall">
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
									</tr>
									</#list> </#if>
								</table>
							</td>
						</tr>
						<tr>
							<td>
								<table class="forumline2 title_bg2" cellspacing="0"
									cellpadding="0" border="0">
									<tr class="gensmall title_bg2">
										<td colspan="4">
											${I18n.getMessage("ForumListing.recentTopic")}
										</td>
									</tr>
									<#list RecentTopics as topic> <#if topic_index < index_topics>
									<tr class="gensmall">
										<td>
											${topic_index+1}
										</td>
										<td>
											<span class="topictitle2">
											<@presentation.folderImage topic/>
											 <a
												href="${JForumContext.encodeURL("/posts/list/${topic.id}")}">
													<#if (topic.title?length == 0)> No Subject <#else>
													${topic.title?html} </#if> </a> </span>
										</td>
										<td>
											${topic.lastPostBy.username}
										</td>
										<td>
											${topic.lastPostTime}
										</td>
									</tr>
									</#if> </#list> <#if (index_topics?number - RecentTopics.size()
									> 0 )> <#list 1.. index_topics - RecentTopics.size() as n>
									<tr class="gensmall">
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
									</tr>
									</#list> </#if>
								</table>
							</td>
							<td>
								<table class="forumline2 title_bg2" cellspacing="0"
									cellpadding="0" border="0">
									<tr class="gensmall title_bg2">
										<td colspan="4">
											${I18n.getMessage("ForumListing.hotestTopic")}
										</td>
									</tr>

									<#list HottestTopics as topic> <#if topic_index < index_topics>
									<tr class="gensmall">
										<td>
											${topic_index + 1}
										</td>
										<td>
											<span class="topictitle2">
											<@presentation.folderImage topic/>
											 <a
												href="${JForumContext.encodeURL("/posts/list/${topic.id}")}">
													<#if (topic.title?length == 0)> No Subject <#else>
													${topic.title?html} </#if> </a> </span>
										</td>
										<td>
											${topic.lastPostBy.username}
										</td>
										<td>
											${topic.lastPostTime}
										</td>
									</tr>
									</#if> </#list> <#if (index_topics?number -
									HottestTopics.size() > 0 )> <#list 1.. (index_topics -
									HottestTopics.size()) as n>
									<tr class="gensmall">
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
										<td>
											&nbsp;
										</td>
									</tr>
									</#list> </#if>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr class="userOnlineInfo">
				<td><div>
					${I18n.getMessage("ForumListing.numberOfUsersOnline", [
					totalOnlineUsers, totalRegisteredOnlineUsers, totalAnonymousUsers
					])}&nbsp;&nbsp;
					<br />
					${I18n.getMessage("ForumListing.mostUsersEverOnline", [
					mostUsersEverOnline.getTotal(),
					mostUsersEverOnline.getDate()?string ])}
					</div>
				</td>
			</tr>
			<tr>
				<td align="center">
					<span class="copyright">
						${I18n.getMessage("ForumBase.copyright")} </span>
					<span class="copyright">
						${I18n.getMessage("ForumBase.contact")} </span>
					<br />
					<span class="copyright">Powered by JForum ${version} &copy;
						JForum Team </span>
				</td>
			</tr>
		</table>
	</body>
</html>
